import { Controller, Get } from '@nestjs/common';
import { UserService } from './user.service';
import {
  ApiTags,
  ApiResponseProperty,
  ApiResponse,
  ApiHeader,
} from '@nestjs/swagger';
import { UserInfoDTO } from '@app/db/model/dto/user.dto';

@Controller('user')
@ApiTags('用户')
export class UserController {
  constructor(private readonly appService: UserService) {}

  @Get('/info')
  @ApiResponse({ type: UserInfoDTO })
  async getInfo(): Promise<UserInfoDTO> {
    return await this.appService.getUserInfo();
  }

  @Get('/person')
  async getPerson(): Promise<any> {
    return await this.appService.getPersonInfo();
  }
}
